#include "SelectServer.hpp"
#include "err.hpp"
#include <memory>
using namespace select_ns;
static void Usage(std::string proc)
{
    std::cerr << "Usage:\n\t" << proc << "port" << "\n\n";
}
//服务器解析读到的函数的接口
std::string transaction(const std::string& request)
{
    return request;
}
//./selectServer 8080
int main(int argc, char* argv[])
{
    std::cout<<sizeof(fd_set)<<std::endl;
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }
    std::unique_ptr<SelectServer> svr(new SelectServer(transaction));
    svr -> InitServer();
    svr -> Start();
    return 0;
} 